home *** CD-ROM | disk | FTP | other *** search
- Path: news.chalmers.se!usenet
- From: Michael Sch=?iso-8859-1?Q?=F6n <ei39418@ios.chalmers.se>?=
- Newsgroups: comp.lang.c++
- Subject: Exception: GPF and DIV by 0 ?
- Date: Tue, 12 Mar 1996 19:40:46 +0000
- Organization: Chalmers University of Technology
- Message-ID: <3145D33E.208A@ios.chalmers.se>
- NNTP-Posting-Host: modem15.ios.chalmers.se
- Mime-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: quoted-printable
- X-Mailer: Mozilla 2.0 (Win16; I)
-
- Hello,
-
- Does anyone know how to catch the following exceptions in Borland C++ =
-
- 4.52:
- - General Protection Fault (GPF)
- - Division by zero
-
- I would like to provide an error handler for these errors.
-
- #Solution 1 - does not work:
- The following code 'should' catch it:
-
- try
- {
- // some C++ code - generates the above mentioned exceptions.
- }
- catch(...)
- {
- // This catch ALL statement does not catch the exceptions.
- // Instead Windows report them.
- }
- #Solution 2 - does not work either:
- // Connect an error handler function via the set_unexpected macro.
- set_unexpected( My_Own_Error_Handler() )
-
-
- Any ideas?
- One solution for the division fault is to put an error handler on the DIV =
-
- interrupt, but that is not a good solution. There must be a better one.
-
- How do one catch a GPF exception?
-
- All suggestions are welcome.
-
- Regards,
- Michael
-
- Please report directly to: ei39418@ios.chalmers.se
-
- --------------------------------------------------
- Michael Sch=F6n
- Chalmers University of Technology
- E-mail: ei39418@ios.chalmers.se
- --------------------------------------------------
-